package com.web.java0327mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author lenovo
 * @Description
 * @Date2025/3/27 下午2:38
 */
@Data
@AllArgsConstructor//带所有参数的构造方法
@NoArgsConstructor//无参的构造方法
@TableName("employee") //表名
public class Employee {
    //指定主键和生成策略 AUTO 自增  INPUT  输入
    @TableId(type= IdType.AUTO)
    private Integer id;
    private String name;
    private Integer age;
    private String gender;
    private String position;
    private Integer departmentId;
    //逻辑删除的标识
    @TableLogic
    private Integer deleted;

//    public static void main(String[] args){
//        Employee employee=new Employee(1,"张三",20,"男","员工",1);
////        employee.setName("张三");
////        employee.setAge(20);
//        System.out.println(employee.getName());
//        System.out.println(employee);
//    }
}
